package com.luncheng.mcp.core.factory;


import com.luncheng.mcp.core.enums.TransportTypeEnum;
import com.luncheng.mcp.core.strategy.SseTransportStrategy;
import com.luncheng.mcp.core.strategy.StdioTransportStrategy;
import com.luncheng.mcp.core.strategy.TransportStrategy;

public class TransportFactory {
    public static TransportStrategy getTransport(TransportTypeEnum type) {
        return switch (type) {
            case STDIO -> new StdioTransportStrategy();
            case SSE -> new SseTransportStrategy();
            default -> throw new IllegalArgumentException("Unsupported transport type: " + type);
        };
    }
}